package com.note.chh.notebook.Adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.note.chh.notebook.Model.EnjoyModel;
import com.note.chh.notebook.R;
import com.note.chh.notebook.Widget.CircleImageView;

/**
 * Created by caihuahui on 2018/3/13.
 */

public class EnjoyAdapter extends BaseQuickAdapter<EnjoyModel,BaseViewHolder>{
    public EnjoyAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, EnjoyModel item) {
        CircleImageView mCircle_enjoy = helper.getView(R.id.mCircle_enjoy);
        helper.setImageResource(R.id.mCircle_enjoy,item.getResId());
        mCircle_enjoy.setFillColor(item.getColor());

        helper.setText(R.id.mText_enjoy,item.getName());
    }
}
